from django.conf.urls import url
from django.urls import path
from rest_framework.routers import DefaultRouter

from . import views

app_name = "user"

router = DefaultRouter()
router.register('', views.AccountViewSet)

urlpatterns = [
    # path('', views.IndexView.as_view(), name="index"),
    path('register/', views.RegisterView.as_view(), name="register"),
    path('login/', views.LoginView.as_view(), name="login"),
    path('logout/', views.LogoutView.as_view(), name="logout"),
    path('passwordchange/', views.PasswordChangeView.as_view(), name="password_change"),
    path('passwordchangedone/', views.PasswordChangeDoneView.as_view(), name="password_change_done"),
    path('passwordreset/', views.PasswordResetView.as_view(), name="password_reset"),
    path('passwordresetconfirm/<uidb64>/<token>/', views.PasswordResetConfirmView.as_view(), name="password_reset_confirm"),
    # path('passwordreset/', views.PasswordResetView.as_view(), name="password_reset"),
] + router.urls




